from bokeh.plotting import figure, save
from bokeh.io import output_file

# 指定输出文件
output_file("line_plot.html")

# 创建数据
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]

# 创建图表
p = figure(title="Line Plot", x_axis_label='x', y_axis_label='y')
p.line(x, y, legend_label="Line", line_width=2)

# 保存为 HTML 文件
save(p)